package starter.model;

import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import java.util.UUID;

/**
 * @author 上等的猪头肉
 * @Title: User
 * @ProjectName ElasticsearchSpringData
 * @Description: 加上了@Document注解之后，默认情况下这个实体中所有的属性都会被建立索引、并且分词
 * @date 2018/10/24 10:01
 */
@Data
@Document(indexName = "user", type = "sys_user", shards = 1, replicas = 0)
@ToString
public class User {

    @Id
    private String id ;

    @Field
    private String status;


    @Field
    private Long time ;

    @Field
    private String username;

    @Field
    private String password;


}
